package de.wesemann.jdedun.entities.calendar.venues;

import de.wesemann.jdedun.entities.AbstractEntity;

/**
 * 
 * @author spinner0815
 *
 */
public class CalendarVenue extends AbstractEntity {

    private String name;
    private String street;
    private int housenumber;
    private String housenumber_additional;
    private String postcode;
    private String city;
    private String phone;
    private String mobile;
    private String url;
    
    /**
     * @return the name
     */
    public String getName() {
        return name;
    }
    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }
    /**
     * @return the street
     */
    public String getStreet() {
        return street;
    }
    /**
     * @param street the street to set
     */
    public void setStreet(String street) {
        this.street = street;
    }
    /**
     * @return the housenumber
     */
    public int getHousenumber() {
        return housenumber;
    }
    /**
     * @param housenumber the housenumber to set
     */
    public void setHousenumber(int housenumber) {
        this.housenumber = housenumber;
    }
    /**
     * @return the housenumber_additional
     */
    public String getHousenumber_additional() {
        return housenumber_additional;
    }
    /**
     * @param housenumber_additional the housenumber_additional to set
     */
    public void setHousenumber_additional(String housenumber_additional) {
        this.housenumber_additional = housenumber_additional;
    }
    /**
     * @return the postcode
     */
    public String getPostcode() {
        return postcode;
    }
    /**
     * @param postcode the postcode to set
     */
    public void setPostcode(String postcode) {
        this.postcode = postcode;
    }
    /**
     * @return the city
     */
    public String getCity() {
        return city;
    }
    /**
     * @param city the city to set
     */
    public void setCity(String city) {
        this.city = city;
    }
    /**
     * @return the phone
     */
    public String getPhone() {
        return phone;
    }
    /**
     * @param phone the phone to set
     */
    public void setPhone(String phone) {
        this.phone = phone;
    }
    /**
     * @return the mobile
     */
    public String getMobile() {
        return mobile;
    }
    /**
     * @param mobile the mobile to set
     */
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
    /**
     * @return the url
     */
    public String getUrl() {
        return url;
    }
    /**
     * @param url the url to set
     */
    public void setUrl(String url) {
        this.url = url;
    }
    /* (non-Javadoc)
     * @see java.lang.Object#hashCode()
     */
    @Override
    public int hashCode() {
	final int prime = 31;
	int result = super.hashCode();
	result = prime * result + ((city == null) ? 0 : city.hashCode());
	result = prime * result + housenumber;
	result = prime
		* result
		+ ((housenumber_additional == null) ? 0
			: housenumber_additional.hashCode());
	result = prime * result + ((mobile == null) ? 0 : mobile.hashCode());
	result = prime * result + ((name == null) ? 0 : name.hashCode());
	result = prime * result + ((phone == null) ? 0 : phone.hashCode());
	result = prime * result
		+ ((postcode == null) ? 0 : postcode.hashCode());
	result = prime * result + ((street == null) ? 0 : street.hashCode());
	result = prime * result + ((url == null) ? 0 : url.hashCode());
	return result;
    }
    /* (non-Javadoc)
     * @see java.lang.Object#equals(java.lang.Object)
     */
    @Override
    public boolean equals(Object obj) {
	if (this == obj) {
	    return true;
	}
	if (!super.equals(obj)) {
	    return false;
	}
	if (getClass() != obj.getClass()) {
	    return false;
	}
	CalendarVenue other = (CalendarVenue) obj;
	if (city == null) {
	    if (other.city != null) {
		return false;
	    }
	} else if (!city.equals(other.city)) {
	    return false;
	}
	if (housenumber != other.housenumber) {
	    return false;
	}
	if (housenumber_additional == null) {
	    if (other.housenumber_additional != null) {
		return false;
	    }
	} else if (!housenumber_additional.equals(other.housenumber_additional)) {
	    return false;
	}
	if (mobile == null) {
	    if (other.mobile != null) {
		return false;
	    }
	} else if (!mobile.equals(other.mobile)) {
	    return false;
	}
	if (name == null) {
	    if (other.name != null) {
		return false;
	    }
	} else if (!name.equals(other.name)) {
	    return false;
	}
	if (phone == null) {
	    if (other.phone != null) {
		return false;
	    }
	} else if (!phone.equals(other.phone)) {
	    return false;
	}
	if (postcode == null) {
	    if (other.postcode != null) {
		return false;
	    }
	} else if (!postcode.equals(other.postcode)) {
	    return false;
	}
	if (street == null) {
	    if (other.street != null) {
		return false;
	    }
	} else if (!street.equals(other.street)) {
	    return false;
	}
	if (url == null) {
	    if (other.url != null) {
		return false;
	    }
	} else if (!url.equals(other.url)) {
	    return false;
	}
	return true;
    }
    /* (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
	StringBuilder builder = new StringBuilder();
	builder.append("CalendarVenue [name=");
	builder.append(name);
	builder.append(", street=");
	builder.append(street);
	builder.append(", housenumber=");
	builder.append(housenumber);
	builder.append(", housenumber_additional=");
	builder.append(housenumber_additional);
	builder.append(", postcode=");
	builder.append(postcode);
	builder.append(", city=");
	builder.append(city);
	builder.append(", phone=");
	builder.append(phone);
	builder.append(", mobile=");
	builder.append(mobile);
	builder.append(", url=");
	builder.append(url);
	builder.append("]");
	return builder.toString();
    }
    
    
}
